package com.smarttourism.controller;

import com.smarttourism.common.core.domain.R;
import com.smarttourism.domain.GoodsModule;
import com.smarttourism.service.GoodsModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：王祖威
 * @Date ：2024/10/23 14:13
 */
@RestController
@RequestMapping("/goodsModule")
public class GoodsModuleController {
    @Autowired
    private GoodsModuleService goodsModuleService;
    @GetMapping("/list")
    @PreAuthorize("@ss.hasPermi('goods:goods:list')")
    public R findList(){
        List<GoodsModule> list = goodsModuleService.findAll();
        return list != null?R.ok(list):R.fail("查询失败");

    }
}




